wpt->creation_time = array[i]->Time;
wpt->wpt_flags.is_split = checkWayPointIsAtSplit(wpt, laps,
nlaps);
-
+ if (array[i]->dpth < 1.0e25f)
+ WAYPT_SET(wpt, depth, array[i]->dpth);
+ if (array[i]->temperature_populated)
+ WAYPT_SET(wpt, temperature, array[i]->temperature);
+
track_add_wpt(trk_head, wpt);
}
static void
gpx_write_common_depth(const waypoint *waypointp, const char *indent)
{
- if (waypointp->depth != 0) {
+ if (waypointp->depth != 0 || waypointp->temperature != 0) {
if (opt_humminbirdext || opt_garminext) {
gbfprintf(ofd, "%s<extensions>\n", indent);
- if (opt_humminbirdext)
- gbfprintf(ofd, "%s <h:depth>%f</h:depth>\n",
- indent, waypointp->depth*100.0);
- if (opt_garminext)
- gbfprintf(ofd, "%s <gpxx:Depth>%f</gpxx:Depth>\n",
- indent, waypointp->depth);
+ if (waypointp->depth != 0) {
+ if (opt_humminbirdext)
+ gbfprintf(ofd, "%s <h:depth>%f</h:depth>\n",
+ indent, waypointp->depth*100.0);
+ if (opt_garminext)
+ gbfprintf(ofd, "%s <gpxx:Depth>%f</gpxx:Depth>\n",
+ indent, waypointp->depth);
+ }
+ if (waypointp->temperature != 0) {
+ if (opt_humminbirdext)
+ gbfprintf(ofd, "%s <h:temperature>%f</h:temperature>\n",
+ indent, waypointp->temperature);
+ if (opt_garminext)
+ gbfprintf(ofd, "%s <gpxx:Temperature>%f</gpxx:Temperature>\n",
+ indent, waypointp->temperature);
+ }
gbfprintf(ofd, "%s</extensions>\n", indent);
}
}